package hfxy.dzx.u13;

import java.awt.FlowLayout;
import java.awt.GraphicsConfiguration;
import java.awt.HeadlessException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JTextField;

public class MyJFrame extends JFrame {
	
	JTextField jt=new JTextField(10);
	JButton jb=new JButton("button");

	public MyJFrame() throws HeadlessException {
		// TODO Auto-generated constructor stub
		this.setLayout(new FlowLayout());
		
		this.add(jt);
		this.add(jb);
		/*
		jb.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				JOptionPane.showMessageDialog(null, jt.getText());
				
			}
		});
		*/
		
		this.setSize(300,330);
		this.setVisible(true);
	}


}
